import request from '@/utils/request'

// 查询存储卷列表
export function listStorageVolume (query) {
  return request({
    url: '/dockerinsight/storageVolume/list',
    method: 'get',
    params: query
  })
}

// 查询存储卷详细
export function getStorageVolume (id) {
  return request({
    url: '/dockerinsight/storageVolume/' + id,
    method: 'get'
  })
}

// 新增存储卷
export function addStorageVolume (data) {
  return request({
    url: '/dockerinsight/storageVolume',
    method: 'post',
    data: data
  })
}

// 修改存储卷
export function updateStorageVolume (data) {
  return request({
    url: '/dockerinsight/storageVolume',
    method: 'put',
    data: data
  })
}

// 删除存储卷
export function delStorageVolume (id) {
  return request({
    url: '/dockerinsight/storageVolume/' + id,
    method: 'delete'
  })
}

// 导出存储卷
export function exportStorageVolume (query) {
  return request({
    url: '/dockerinsight/storageVolume/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/dockerinsight/storageVolume/getInitData/' + dictTypes,
    method: 'get'
  })
}
